package main

import (
	"account_project/cmd/api"
	"fmt"
	"github.com/spf13/cobra"
	"gitlab.whjzjx.cn/shanghai/kit/command"
)

func main() {
	c := command.Cmd()
	c.AddServer(&cobra.Command{
		Use: "api",
		Run: func(cmd *cobra.Command, args []string) {
			api.Serve()
		},
	})

	c.AddWorker(&cobra.Command{
		Use: "redis",
		Run: func(cmd *cobra.Command, args []string) {
			fmt.Println("this is a redis worker")
		},
	})

	c.Run()
}
